home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / elv18src.zip / doc / visual.ms < prev   
Text File  |  1993-05-13  |  12KB  |  298 lines

  1. .Go 2 "VISUAL MODE COMMANDS"
  2. .PP
  3. Most visual mode commands are one keystroke long.
  4. The following table lists the operation performed by each keystroke,
  5. and also denotes any options or arguments that it accepts.
  6. Notes at the end of the table describe the notation used in this table.
  7. .PP
  8. In addition to the keys listed here, your keyboard's "arrow" keys
  9. will be interpreted as the appropriate cursor movement commands.
  10. The same goes for <PgUp> and <PgDn>, if your keyboard has them.
  11. The <Insert> key will toggle between insert mode and replace mode.
  12. There is a colon mode command (":map", to be described later)
  13. which will allow you to define other keys, such as function keys.
  14. .PP
  15. A tip: visual command mode looks a lot like text input mode.
  16. If you forget which mode you're in, just hit the <Esc> key.
  17. If \*E beeps, then you're in visual command mode.
  18. If \*E does not beep, then you were in input mode,
  19. but by hitting <Esc> you will have switched to visual command mode.
  20. So, one way or another, after <Esc> \*E will be ready for a command.
  21. .LD
  22. .ta 0.7i 1.3i
  23. \*SCOMMAND    DESCRIPTION\*s
  24.     ^A    Search for next occurrence of word at cursor (MOVE)(EXT)
  25.     ^B    Move toward the top of the file by 1 screenful
  26.     ^C    --- (usually sends SIGINT, to interrupt a command)
  27. count    ^D    Scroll down <count> lines (default 1/2 screen)
  28. count    ^E    Scroll up <count> lines
  29.     ^F    Move toward the bottom of the file by 1 screenful
  30.     ^G    Show file status, and the current line #
  31. count    ^H    Move left, like h (MOVE)
  32.     ^I    ---
  33. count    ^J    Move down (MOVE)
  34.     ^K    ---
  35.     ^L    Redraw the screen
  36. count    ^M    Move to the front of the next line (MOVE)
  37. count    ^N    Move down (MOVE)
  38.     ^O    ---
  39. count    ^P    Move up (MOVE)
  40.     ^Q    --- (typically XON, which restarts screen updates)
  41.     ^R    Redraw the screen
  42.     ^S    --- (typically XOFF, which stops screen updates)
  43.     ^T    Return to source of previous :tag or ^] command.
  44. count    ^U    Scroll up <count> lines (default 1/2 screen)
  45.     ^V    ---
  46.     ^W    ---
  47. count    ^X    Move to a physical column number on the screen (MOVE) (EXT)
  48. count    ^Y    Scroll down <count> lines
  49.     ^Z    --- (sometimes sends SIGSUSP, to suspend execution)
  50.     ESC    ---
  51.     ^\\    --- (usually sends SIGQUIT, which is ignored)
  52.     ^]    If the cursor is on a tag name, go to that tag
  53.     ^^    Switch to the previous file, like ":e #"
  54. count    ^_    Move to a given screen-relative row (MOVE) (EXT)
  55. count    SPC    Move right,like l (MOVE)
  56.     ! \*smv\*S    Run the selected lines thru an external filter program
  57.     " \*skey\*S    Select which cut buffer to use next
  58. count    # \*s+\*S    Increment a number (EDIT) (EXT)
  59.     $    Move to the rear of the current line (MOVE)
  60. count    %    Move to matching (){}[] or to a given % of file (MOVE) (EXT)
  61. count    &    Repeat the previous ":s//" command here (EDIT)
  62.     ' \*skey\*S    Move to a marked line (MOVE)
  63. count    (    Move backward <count> sentences (MOVE)
  64. count    )    Move forward <count> sentences (MOVE)
  65.     *    Go to the next error in the errlist (EXT)
  66. count    +    Move to the front of the next line (MOVE)
  67. count    ,    Repeat the previous [fFtT] but in the other direction (MOVE)
  68. count    -    Move to the front of the preceding line (MOVE)
  69. count    .    Repeat the previous "edit" command
  70.     / \*stext\*S    Search forward for a given regular expression (MOVE)
  71.     0    If not part of count, move to 1st char of this line (MOVE)
  72.     1    Part of count
  73.     2    Part of count
  74.     3    Part of count
  75.     4    Part of count
  76.     5    Part of count
  77.     6    Part of count
  78.     7    Part of count
  79.     8    Part of count
  80.     9    Part of count
  81.     : \*stext\*S    Run single EX cmd
  82. count    ;    Repeat the previous [fFtT] cmd (MOVE)
  83.     < \*smv\*S    Shift text left (EDIT)
  84.     = \*smv\*S    Reformat
  85.     > \*smv\*S    Shift text right (EDIT)
  86.     ? \*stext\*S    Search backward for a given regular expression (MOVE)
  87.     @ \*skey\*S    Execute the contents of a cut-buffer as VI commands
  88. count    A \*sinp\*S    Append at end of the line (EDIT)
  89. count    B    Move back Word (MOVE)
  90.     C \*sinp\*S    Change text from the cursor through the end of the line (EDIT)
  91.     D    Delete text from the cursor through the end of the line (EDIT)
  92. count    E    Move end of Word (MOVE)
  93. count    F \*skey\*S    Move leftward to a given character (MOVE)
  94. count    G    Move to line #<count> (default is the bottom line) (MOVE)
  95. count    H    Move to home row (the line at the top of the screen)
  96. count    I \*sinp\*S    Insert at the front of the line (after indents) (EDIT)
  97. count    J    Join lines, to form one big line (EDIT)
  98.     K    Look up keyword (EXT)
  99. count    L    Move to last row (the line at the bottom of the screen)
  100.     M    Move to middle row
  101.     N    Repeat previous search, but in the opposite direction (MOVE)
  102. count    O \*sinp\*S    Open up a new line above the current line (EDIT)
  103.     P    Paste text before the cursor (EDIT)
  104.     Q    Quit to EX mode
  105.     R \*sinp\*S    Overtype (EDIT)
  106. count    S \*sinp\*S    Change lines, like <count>cc
  107. count    T \*skey\*S    Move leftward *almost* to a given character (MOVE)
  108.     U    Undo all recent changes to the current line
  109.     V    Start marking lines for c/d/y/</>/!/\\ (EXT)
  110. count    W    Move forward <count> Words (MOVE)
  111. count    X    Delete the character(s) to the left of the cursor (EDIT)
  112. count    Y    Yank text line(s) (copy them into a cut buffer)
  113.     Z Z    Save the file & exit
  114.     [ [    Move back 1 section (MOVE)
  115.     \\ \*smv\*S    Pop-up menu for modifying text (EXT)
  116.     ] ]    Move forward 1 section (MOVE)
  117.     ^    Move to the front of the current line (after indent) (MOVE)
  118. count    _    Move to the current line
  119.     ` \*skey\*S    Move to a marked character (MOVE)
  120. count    a \*sinp\*S    Insert text after the cursor (EDIT)
  121. count    b    Move back <count> words (MOVE)
  122.     c \*smv\*S    Change text (EDIT)
  123.     d \*smv\*S    Delete text (EDIT)
  124. count    e    Move forward to the end of the current word (MOVE)
  125. count    f \*skey\*S    Move rightward to a given character (MOVE)
  126.     g    ---
  127. count    h    Move left (MOVE)
  128. count    i \*sinp\*S    Insert text at the cursor (EDIT)
  129. count    j    Move down (MOVE)
  130. count    k    Move up (MOVE)
  131. count    l    Move right (MOVE)
  132.     m \*skey\*S    Mark a line or character
  133.     n    Repeat the previous search (MOVE)
  134. count    o \*sinp\*S    Open a new line below the current line (EDIT)
  135.     p    Paste text after the cursor (EDIT)
  136.     q    ---
  137. count    r \*skey\*S    Replace <count> chars by a given character (EDIT)
  138. count    s \*sinp\*S    Replace <count> chars with text from the user (EDIT)
  139. count    t \*skey\*S    Move rightward *almost* to a given character (MOVE)
  140.     u    Undo the previous edit command
  141.     v    Start marking characters for c/d/y/</>/!/\\ (EXT)
  142. count    w    Move forward <count> words (MOVE)
  143. count    x    Delete the character that the cursor's on (EDIT)
  144.     y \*smv\*S    Yank text (copy it into a cut buffer)
  145.     z \*skey\*S    Scroll current line to the screen's +=top -=bottom .=middle
  146. count    {    Move back <count> paragraphs (MOVE)
  147. count    |    Move to column <count> (the leftmost column is 1)
  148. count    }    Move forward <count> paragraphs (MOVE)
  149. count    ~    Switch a character between uppercase & lowercase (EDIT)
  150.     DEL    --- (usually mapped to shift-X, so it deletes one character)
  151. .DE
  152. .IP count 0.7i
  153. Many commands may be preceded by a count.  This is a sequence of digits
  154. representing a decimal number.  For most commands that use a count,
  155. the command is repeated <count> times.  The count is always optional,
  156. and usually defaults to 1.
  157. .IP key 0.7i
  158. Some commands require two keystrokes.  The first key always determines
  159. which command is to be executed.  The second key is used as a parameter
  160. to the command.
  161. .IP mv 0.7i
  162. Some commands (! < > c d y \\ =) operate on text between the cursor and some
  163. other position.
  164. There are three ways that you can specify that other position.
  165. .IP "" 0.7i
  166. The first way is to follow the command keystroke with a movement command.
  167. For example, "dw" deletes a single word.
  168. "d3w" and "3dw" both delete three words.
  169. .IP "" 0.7i
  170. The second way is to type the command keystroke twice.
  171. This causes whole lines to be acted upon.
  172. For example, ">>" indents the current line.
  173. "3>>" indents the current line and the following two lines.
  174. .IP "" 0.7i
  175. The last way is to move the cursor to one end of the text,
  176. type 'v' or 'V' to start marking,
  177. move the cursor to the other end,
  178. and then type the desired command key.
  179. .IP inp 0.7i
  180. Many commands allow the user to interactively enter text.
  181. See the discussion of "input mode" in the following section.
  182. .IP (EXT) 0.7i
  183. These commands are extensions -- the real vi doesn't have them.
  184. .IP (EDIT) 0.7i
  185. These commands affect text, and may be repeated by the "." command.
  186. .IP (MOVE) 0.7i
  187. These commands move the cursor, and may be used to specify the extent
  188. of a member of the "mv" class of commands.
  189. .NH 2
  190. Input Mode
  191. .PP
  192. Yo